<?php 
error_reporting(0);
include '../data/data.php';
$url_data = $config['ip']; //数据库IP
$ku_date = $config['data'];  //数据库
$user_date = $config['user'];  //数据库账号
$pass_date = $config['pass'];  //数据库密码
$sdk=$_GET['sdk'];  //游戏key
$uid=$_GET['uid'];  //授权信息
$user=$_GET['user']; //平台账号 
if($sdk=='' || $uid=='' || $user==''){
exit('gameno');
}else{
$link=mysql_connect($url_data,$user_date,$pass_date);  //数据库信息
$a=mysql_select_db($ku_date, $link) or die("Unable to connect to the MySQL!"); //连接数据库
$result= mysql_query("SELECT * FROM games WHERE gmkey LIKE '$sdk'", $link);  //验证游戏
$row = mysql_fetch_array($result);  
$gameid=$row['id']; //游戏参数
if($gameid==''){
  exit('gameno');
}
$result= mysql_query("SELECT * FROM games_vip WHERE game_id LIKE '$gameid' AND user_id LIKE '$user' AND uid_id LIKE '$uid'", $link);  //查询授权
$row = mysql_fetch_array($result); 
mysql_close($link);
  if($row['uid_id']==''){
  exit('gameno');
  }else{
  exit($row['uid_id']);
  }
}

?>